cmake_minimum_required(VERSION 3.25.0)
project(MMPose_Inference VERSION 1.0.0 DESCRIPTION "mmpose inference CXX" LANGUAGES CXX)
# 指定C++版本
set(CMAKE_CXX_STANDARD 17)



# 设置输出目录
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
set(RTMPoseUtils_Dir ${CMAKE_SOURCE_DIR}/src/rtmpose_utils)
set(OnnxruntimeCpu_Dir ${CMAKE_SOURCE_DIR}/src/onnxruntime_cpu_model_base)
set(RTMDetonnxruntime_Dir ${CMAKE_SOURCE_DIR}/src/rtmdet_onnxruntime)
set(RTMPoseonnxruntime_Dir ${CMAKE_SOURCE_DIR}/src/rtmpose_onnxruntime)
set(RTMPoseTrackeronnxruntime_Dir ${CMAKE_SOURCE_DIR}/src/rtmpose_tracker_onnxruntime)



# 第三方库
set(OpenCV_DIR "F:/opencv/opencv_msvc/build/x64/vc15/lib")
find_package(OpenCV REQUIRED)

set(ONNXRUNTIME_INCLUDE_Dir ${CMAKE_SOURCE_DIR}/third_party/onnxruntime-win-x64-1.14.1/include)
# 设置库目录
set(ONNXRUNTIME_LIB_DIR ${CMAKE_SOURCE_DIR}/third_party/onnxruntime-win-x64-1.14.1/lib)

# 查找所有 .lib 和 .dll 文件
file(GLOB_RECURSE ONNXRUNTIME_LIB "${ONNXRUNTIME_LIB_DIR}/*.lib")
file(GLOB_RECURSE ONNXRUNTIME_DLL "${ONNXRUNTIME_LIB_DIR}/*.dll")
# 合并库文件和动态库文件
list(APPEND ONNXRUNTIME_LIBS ${ONNXRUNTIME_LIB})
# include_directories(${OpenCV_INCLUDE_DIRS} ${ONNXRUNTIME_INCLUDE_Dir})

message(STATUS "OpenCV_INCLUDE_DIRS: ${OpenCV_INCLUDE_DIRS}")

message(STATUS "ONNXRUNTIME_INCLUDE_Dir: ${ONNXRUNTIME_LIBS}")

# include_directories( ${ONNXRUNTIME_INCLUDE_Dir})


# 添加子目录
add_subdirectory(src)

